﻿using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;

namespace SurveyListsAdministration
{
    /// <summary>
    /// List Item Events
    /// </summary>
    public class AdministrationListEventHandler : SPItemEventReceiver
    {
        public override void ItemDeleting(SPItemEventProperties properties)
        {
            using (DisabledEventFiringScope scope = new DisabledEventFiringScope())
            {
                base.ItemDeleting(properties);
                SPTools.DeleteSurveyItem(properties);
            }
        }
    }
}
